//
//  HNDistributionStudentCell.m
//  优学荟管理系统
//
//  Created by edz on 2017/12/13.
//  Copyright © 2017年 星道三好. All rights reserved.
//

#import "HNDistributionStudentCell.h"

@implementation HNDistributionStudentCell
{
    __weak IBOutlet UIImageView *_Img;
    __weak IBOutlet UILabel *_Name;
    __weak IBOutlet UILabel *_Phone;
    
}

- (void)setModel:(HNDistributionStudentModel *)Model {
    
    _Model = Model;
    
    _Name.text = Model.petName;
    _Phone.text = Model.phone;
    [Model.avatar isKindOfClass:[NSNull class]] ? nil : [_Img sd_setImageWithURL:[NSURL URLWithString:Model.avatar] placeholderImage:[UIImage imageNamed:@"bg_picture_default_DistributionStudent"]];
}


- (IBAction)Delete:(UIButton *)sender {
    
    self.ClickDelete ? self.ClickDelete(self.Model) : nil;
}



- (void)layoutSubviews {
    
    [super layoutSubviews];
    
    _Img.layer.masksToBounds = YES;
    _Img.layer.cornerRadius = _Img.frame.size.width / 2;
}
@end
